package com.jack.jetpackapp.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.jack.jetpackapp.bean.User

class UserModel : ViewModel() {
    private val _userInfo = MutableLiveData<User>()

    val userInfo = _userInfo

    fun updateUserInfo(name: String, age: Int) {
        val user = User()
        _userInfo.value = user.copy(name = name, age = age)
    }
}